<?php
/* @var $this PatientController */
/* @var $model Patient */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'patient-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'patient_firstname'); ?>
		<?php echo $form->textField($model,'patient_firstname',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'patient_firstname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'patient_middlename'); ?>
		<?php echo $form->textField($model,'patient_middlename',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'patient_middlename'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'patient_lastname'); ?>
		<?php echo $form->textField($model,'patient_lastname',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'patient_lastname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'patient_contact'); ?>
		<?php echo $form->textField($model,'patient_contact',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'patient_contact'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'patient_address'); ?>
		<?php echo $form->textField($model,'patient_address',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'patient_address'); ?>
	</div>

	<div class="row">
                <?php echo $form->labelEx($model,'date'); ?>
                        <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
        'model'=>$model, 'attribute'=>'date',
        'options'=>array(
            'dateFormat'=>'yy-mm-dd',
            'yearRange'=>'-20:+20',
            'changeYear'=>'true',
            'changeMonth'=>'true',
        ),
                )); ?>
                <?php echo $form->error($model,'date'); ?>


	<div class="row">
                <?php echo $form->labelEx($model,'patient_birthdate'); ?>
                        <?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
        'model'=>$model, 'attribute'=>'patient_birthdate',
        'options'=>array(
            'dateFormat'=>'yy-mm-dd',
            'yearRange'=>'-20:+20',
            'changeYear'=>'true',
            'changeMonth'=>'true',
        ),
                )); ?>
                <?php echo $form->error($model,'patient_birthdate'); ?>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->